{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3.7.9 64-bit (system)"
  },
  "metadata": {
   "interpreter": {
    "hash": "2869ce9e5406e14300c007bd85d712496dadc3f6ad6dbd3a9c900289863a5f83"
   }
  },
  "interpreter": {
   "hash": "e79309c8f6622ce988b04c24bb6d5b54a89cf65be865511eaf3b861e4b3f791f"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "# 导入库"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "source": [
    "import efinance as ef"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "# 使用例子"
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 获取单只股票基本信息"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "source": [
    "stock_code = '600519'\r\n",
    "ef.stock.get_base_info(stock_code)"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "股票代码                  600519\n",
       "股票名称                    贵州茅台\n",
       "市盈率(动)                 40.31\n",
       "市净率                    12.29\n",
       "所处行业                    酿酒行业\n",
       "总市值          1987719464874.0\n",
       "流通市值         1987719464874.0\n",
       "板块编号                  BK0477\n",
       "ROE                     14.2\n",
       "净利率                53.387935\n",
       "净利润       24653985551.580002\n",
       "毛利率                91.378421\n",
       "dtype: object"
      ]
     },
     "metadata": {},
     "execution_count": 2
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 获取多只股票基本信息"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "source": [
    "stock_codes = ['600519','300750']\r\n",
    "ef.stock.get_base_info(stock_codes)"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stderr",
     "text": [
      "Processing => 300750: 100%|██████████| 2/2 [00:00<00:00, 32.87it/s]"
     ]
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "     股票代码  股票名称  市盈率(动)    市净率  所处行业           总市值          流通市值    板块编号  \\\n",
       "0  600519  贵州茅台   40.31  12.29  酿酒行业  1.987719e+12  1.987719e+12  BK0477   \n",
       "1  300750  宁德时代  130.90  17.07  汽车行业  1.173867e+12  1.023030e+12  BK0481   \n",
       "\n",
       "     ROE        净利率           净利润        毛利率  \n",
       "0  14.20  53.387935  2.465399e+10  91.378421  \n",
       "1   6.74  12.082045  4.483788e+09  27.255689  "
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>市盈率(动)</th>\n",
       "      <th>市净率</th>\n",
       "      <th>所处行业</th>\n",
       "      <th>总市值</th>\n",
       "      <th>流通市值</th>\n",
       "      <th>板块编号</th>\n",
       "      <th>ROE</th>\n",
       "      <th>净利率</th>\n",
       "      <th>净利润</th>\n",
       "      <th>毛利率</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>600519</td>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>40.31</td>\n",
       "      <td>12.29</td>\n",
       "      <td>酿酒行业</td>\n",
       "      <td>1.987719e+12</td>\n",
       "      <td>1.987719e+12</td>\n",
       "      <td>BK0477</td>\n",
       "      <td>14.20</td>\n",
       "      <td>53.387935</td>\n",
       "      <td>2.465399e+10</td>\n",
       "      <td>91.378421</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>300750</td>\n",
       "      <td>宁德时代</td>\n",
       "      <td>130.90</td>\n",
       "      <td>17.07</td>\n",
       "      <td>汽车行业</td>\n",
       "      <td>1.173867e+12</td>\n",
       "      <td>1.023030e+12</td>\n",
       "      <td>BK0481</td>\n",
       "      <td>6.74</td>\n",
       "      <td>12.082045</td>\n",
       "      <td>4.483788e+09</td>\n",
       "      <td>27.255689</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 3
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 获取单只股票日 k 数据"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "source": [
    "\r\n",
    "beg = '20200101' # 开始日期\r\n",
    "end = '20210101'   # 结束日期\r\n",
    "ef.stock.get_quote_history(stock_code,beg== beg,end=end)"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "      股票名称    股票代码          日期       开盘       收盘       最高       最低     成交量  \\\n",
       "0     贵州茅台  600519  2001-08-27   -89.74   -89.53   -89.08   -90.07  406318   \n",
       "1     贵州茅台  600519  2001-08-28   -89.64   -89.27   -89.24   -89.72  129647   \n",
       "2     贵州茅台  600519  2001-08-29   -89.24   -89.36   -89.24   -89.42   53252   \n",
       "3     贵州茅台  600519  2001-08-30   -89.38   -89.22   -89.14   -89.44   48013   \n",
       "4     贵州茅台  600519  2001-08-31   -89.21   -89.24   -89.12   -89.28   23231   \n",
       "...    ...     ...         ...      ...      ...      ...      ...     ...   \n",
       "4617  贵州茅台  600519  2020-12-25  1783.70  1810.71  1827.71  1780.71   23088   \n",
       "4618  贵州茅台  600519  2020-12-28  1807.31  1853.71  1869.51  1806.76   30080   \n",
       "4619  贵州茅台  600519  2020-12-29  1853.71  1847.71  1867.51  1835.71   22868   \n",
       "4620  贵州茅台  600519  2020-12-30  1850.71  1913.71  1913.71  1850.70   34452   \n",
       "4621  贵州茅台  600519  2020-12-31  1921.71  1978.71  1979.69  1919.71   38860   \n",
       "\n",
       "               成交额    振幅   涨跌幅    涨跌额    换手率  \n",
       "0     1.410347e+09 -1.10  0.92   0.83  56.83  \n",
       "1     4.634630e+08 -0.54  0.29   0.26  18.13  \n",
       "2     1.946890e+08 -0.20 -0.10  -0.09   7.45  \n",
       "3     1.775580e+08 -0.34  0.16   0.14   6.72  \n",
       "4     8.623100e+07 -0.18 -0.02  -0.02   3.25  \n",
       "...            ...   ...   ...    ...    ...  \n",
       "4617  4.218998e+09  2.60 -0.02  -0.34   0.18  \n",
       "4618  5.616529e+09  3.47  2.37  43.00   0.24  \n",
       "4619  4.275995e+09  1.72 -0.32  -6.00   0.18  \n",
       "4620  6.604461e+09  3.41  3.57  66.00   0.27  \n",
       "4621  7.682301e+09  3.13  3.40  65.00   0.31  \n",
       "\n",
       "[4622 rows x 13 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票名称</th>\n",
       "      <th>股票代码</th>\n",
       "      <th>日期</th>\n",
       "      <th>开盘</th>\n",
       "      <th>收盘</th>\n",
       "      <th>最高</th>\n",
       "      <th>最低</th>\n",
       "      <th>成交量</th>\n",
       "      <th>成交额</th>\n",
       "      <th>振幅</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>涨跌额</th>\n",
       "      <th>换手率</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-27</td>\n",
       "      <td>-89.74</td>\n",
       "      <td>-89.53</td>\n",
       "      <td>-89.08</td>\n",
       "      <td>-90.07</td>\n",
       "      <td>406318</td>\n",
       "      <td>1.410347e+09</td>\n",
       "      <td>-1.10</td>\n",
       "      <td>0.92</td>\n",
       "      <td>0.83</td>\n",
       "      <td>56.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-28</td>\n",
       "      <td>-89.64</td>\n",
       "      <td>-89.27</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.72</td>\n",
       "      <td>129647</td>\n",
       "      <td>4.634630e+08</td>\n",
       "      <td>-0.54</td>\n",
       "      <td>0.29</td>\n",
       "      <td>0.26</td>\n",
       "      <td>18.13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-29</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.36</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.42</td>\n",
       "      <td>53252</td>\n",
       "      <td>1.946890e+08</td>\n",
       "      <td>-0.20</td>\n",
       "      <td>-0.10</td>\n",
       "      <td>-0.09</td>\n",
       "      <td>7.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-30</td>\n",
       "      <td>-89.38</td>\n",
       "      <td>-89.22</td>\n",
       "      <td>-89.14</td>\n",
       "      <td>-89.44</td>\n",
       "      <td>48013</td>\n",
       "      <td>1.775580e+08</td>\n",
       "      <td>-0.34</td>\n",
       "      <td>0.16</td>\n",
       "      <td>0.14</td>\n",
       "      <td>6.72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-31</td>\n",
       "      <td>-89.21</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.12</td>\n",
       "      <td>-89.28</td>\n",
       "      <td>23231</td>\n",
       "      <td>8.623100e+07</td>\n",
       "      <td>-0.18</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>3.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4617</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-25</td>\n",
       "      <td>1783.70</td>\n",
       "      <td>1810.71</td>\n",
       "      <td>1827.71</td>\n",
       "      <td>1780.71</td>\n",
       "      <td>23088</td>\n",
       "      <td>4.218998e+09</td>\n",
       "      <td>2.60</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>-0.34</td>\n",
       "      <td>0.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4618</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-28</td>\n",
       "      <td>1807.31</td>\n",
       "      <td>1853.71</td>\n",
       "      <td>1869.51</td>\n",
       "      <td>1806.76</td>\n",
       "      <td>30080</td>\n",
       "      <td>5.616529e+09</td>\n",
       "      <td>3.47</td>\n",
       "      <td>2.37</td>\n",
       "      <td>43.00</td>\n",
       "      <td>0.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4619</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-29</td>\n",
       "      <td>1853.71</td>\n",
       "      <td>1847.71</td>\n",
       "      <td>1867.51</td>\n",
       "      <td>1835.71</td>\n",
       "      <td>22868</td>\n",
       "      <td>4.275995e+09</td>\n",
       "      <td>1.72</td>\n",
       "      <td>-0.32</td>\n",
       "      <td>-6.00</td>\n",
       "      <td>0.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4620</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-30</td>\n",
       "      <td>1850.71</td>\n",
       "      <td>1913.71</td>\n",
       "      <td>1913.71</td>\n",
       "      <td>1850.70</td>\n",
       "      <td>34452</td>\n",
       "      <td>6.604461e+09</td>\n",
       "      <td>3.41</td>\n",
       "      <td>3.57</td>\n",
       "      <td>66.00</td>\n",
       "      <td>0.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4621</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-31</td>\n",
       "      <td>1921.71</td>\n",
       "      <td>1978.71</td>\n",
       "      <td>1979.69</td>\n",
       "      <td>1919.71</td>\n",
       "      <td>38860</td>\n",
       "      <td>7.682301e+09</td>\n",
       "      <td>3.13</td>\n",
       "      <td>3.40</td>\n",
       "      <td>65.00</td>\n",
       "      <td>0.31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4622 rows × 13 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 4
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "#### 获取单只股票的 5 分钟k线数据"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "source": [
    "import efinance as ef\r\n",
    "stock_code = '600519'\r\n",
    "beg = '20200101' # 开始日期\r\n",
    "end = '20500101'   # 结束日期(最好比当前日期大，要不然可能没有数据)\r\n",
    "klt = 5 # 指定获取的 k 线数据是 5 分钟的\r\n",
    "ef.stock.get_quote_history(stock_code,beg = beg,end = end,klt=5)\r\n"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "      股票名称    股票代码                日期       开盘       收盘       最高       最低  \\\n",
       "0     贵州茅台  600519  2021-07-16 09:35  1980.00  1986.99  1996.60  1980.00   \n",
       "1     贵州茅台  600519  2021-07-16 09:40  1986.66  1972.00  1986.66  1972.00   \n",
       "2     贵州茅台  600519  2021-07-16 09:45  1973.00  1977.66  1979.00  1970.00   \n",
       "3     贵州茅台  600519  2021-07-16 09:50  1977.66  1977.85  1978.00  1972.16   \n",
       "4     贵州茅台  600519  2021-07-16 09:55  1977.90  1972.01  1982.70  1972.00   \n",
       "...    ...     ...               ...      ...      ...      ...      ...   \n",
       "1522  贵州茅台  600519  2021-08-30 13:55  1591.00  1590.00  1593.99  1588.34   \n",
       "1523  贵州茅台  600519  2021-08-30 14:00  1590.15  1582.06  1590.22  1582.06   \n",
       "1524  贵州茅台  600519  2021-08-30 14:05  1582.02  1585.05  1588.28  1580.03   \n",
       "1525  贵州茅台  600519  2021-08-30 14:10  1583.60  1584.00  1585.10  1581.69   \n",
       "1526  贵州茅台  600519  2021-08-30 14:15  1585.00  1582.33  1585.02  1582.23   \n",
       "\n",
       "       成交量          成交额    振幅   涨跌幅    涨跌额   换手率  \n",
       "0     2221  441525957.0  0.83 -0.55 -11.00  0.02  \n",
       "1     2084  412387747.0  0.74 -0.75 -14.99  0.02  \n",
       "2     1258  248031161.0  0.46  0.29   5.66  0.01  \n",
       "3      561  110835110.0  0.30  0.01   0.19  0.00  \n",
       "4      992  196066622.0  0.54 -0.30  -5.84  0.01  \n",
       "...    ...          ...   ...   ...    ...   ...  \n",
       "1522   552   87810423.0  0.36 -0.06  -1.01  0.00  \n",
       "1523   461   73220772.0  0.51 -0.50  -7.94  0.00  \n",
       "1524   437   69234613.0  0.52  0.19   2.99  0.00  \n",
       "1525   443   70119399.0  0.22 -0.07  -1.05  0.00  \n",
       "1526    18    2850181.0  0.18 -0.11  -1.67  0.00  \n",
       "\n",
       "[1527 rows x 13 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票名称</th>\n",
       "      <th>股票代码</th>\n",
       "      <th>日期</th>\n",
       "      <th>开盘</th>\n",
       "      <th>收盘</th>\n",
       "      <th>最高</th>\n",
       "      <th>最低</th>\n",
       "      <th>成交量</th>\n",
       "      <th>成交额</th>\n",
       "      <th>振幅</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>涨跌额</th>\n",
       "      <th>换手率</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-07-16 09:35</td>\n",
       "      <td>1980.00</td>\n",
       "      <td>1986.99</td>\n",
       "      <td>1996.60</td>\n",
       "      <td>1980.00</td>\n",
       "      <td>2221</td>\n",
       "      <td>441525957.0</td>\n",
       "      <td>0.83</td>\n",
       "      <td>-0.55</td>\n",
       "      <td>-11.00</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-07-16 09:40</td>\n",
       "      <td>1986.66</td>\n",
       "      <td>1972.00</td>\n",
       "      <td>1986.66</td>\n",
       "      <td>1972.00</td>\n",
       "      <td>2084</td>\n",
       "      <td>412387747.0</td>\n",
       "      <td>0.74</td>\n",
       "      <td>-0.75</td>\n",
       "      <td>-14.99</td>\n",
       "      <td>0.02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-07-16 09:45</td>\n",
       "      <td>1973.00</td>\n",
       "      <td>1977.66</td>\n",
       "      <td>1979.00</td>\n",
       "      <td>1970.00</td>\n",
       "      <td>1258</td>\n",
       "      <td>248031161.0</td>\n",
       "      <td>0.46</td>\n",
       "      <td>0.29</td>\n",
       "      <td>5.66</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-07-16 09:50</td>\n",
       "      <td>1977.66</td>\n",
       "      <td>1977.85</td>\n",
       "      <td>1978.00</td>\n",
       "      <td>1972.16</td>\n",
       "      <td>561</td>\n",
       "      <td>110835110.0</td>\n",
       "      <td>0.30</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.19</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-07-16 09:55</td>\n",
       "      <td>1977.90</td>\n",
       "      <td>1972.01</td>\n",
       "      <td>1982.70</td>\n",
       "      <td>1972.00</td>\n",
       "      <td>992</td>\n",
       "      <td>196066622.0</td>\n",
       "      <td>0.54</td>\n",
       "      <td>-0.30</td>\n",
       "      <td>-5.84</td>\n",
       "      <td>0.01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1522</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 13:55</td>\n",
       "      <td>1591.00</td>\n",
       "      <td>1590.00</td>\n",
       "      <td>1593.99</td>\n",
       "      <td>1588.34</td>\n",
       "      <td>552</td>\n",
       "      <td>87810423.0</td>\n",
       "      <td>0.36</td>\n",
       "      <td>-0.06</td>\n",
       "      <td>-1.01</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1523</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:00</td>\n",
       "      <td>1590.15</td>\n",
       "      <td>1582.06</td>\n",
       "      <td>1590.22</td>\n",
       "      <td>1582.06</td>\n",
       "      <td>461</td>\n",
       "      <td>73220772.0</td>\n",
       "      <td>0.51</td>\n",
       "      <td>-0.50</td>\n",
       "      <td>-7.94</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1524</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:05</td>\n",
       "      <td>1582.02</td>\n",
       "      <td>1585.05</td>\n",
       "      <td>1588.28</td>\n",
       "      <td>1580.03</td>\n",
       "      <td>437</td>\n",
       "      <td>69234613.0</td>\n",
       "      <td>0.52</td>\n",
       "      <td>0.19</td>\n",
       "      <td>2.99</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1525</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:10</td>\n",
       "      <td>1583.60</td>\n",
       "      <td>1584.00</td>\n",
       "      <td>1585.10</td>\n",
       "      <td>1581.69</td>\n",
       "      <td>443</td>\n",
       "      <td>70119399.0</td>\n",
       "      <td>0.22</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>-1.05</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1526</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:15</td>\n",
       "      <td>1585.00</td>\n",
       "      <td>1582.33</td>\n",
       "      <td>1585.02</td>\n",
       "      <td>1582.23</td>\n",
       "      <td>18</td>\n",
       "      <td>2850181.0</td>\n",
       "      <td>0.18</td>\n",
       "      <td>-0.11</td>\n",
       "      <td>-1.67</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1527 rows × 13 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 5
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 获取多只股票日 k 数据(得到以股票代码为 key，以 pandas.DataFrame 为值的字典)"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "source": [
    "\r\n",
    "beg = '20200101' # 开始日期\r\n",
    "end = '20210101'   # 结束日期\r\n",
    "stock_codes = ['600519','300750']\r\n",
    "df_items = ef.stock.get_quote_history(stock_codes,beg== beg,end=end)"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stderr",
     "text": [
      "Processing => 600519: 100%|██████████| 2/2 [00:00<00:00,  3.20it/s]\n"
     ]
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "source": [
    "type(df_items) # 查看类型"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "dict"
      ]
     },
     "metadata": {},
     "execution_count": 7
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "source": [
    "df_items.keys()"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "dict_keys(['300750', '600519'])"
      ]
     },
     "metadata": {},
     "execution_count": 8
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "source": [
    "df_items[stock_codes[0]] # 查看第一支股票的的 k 线数据"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "      股票名称    股票代码          日期       开盘       收盘       最高       最低     成交量  \\\n",
       "0     贵州茅台  600519  2001-08-27   -89.74   -89.53   -89.08   -90.07  406318   \n",
       "1     贵州茅台  600519  2001-08-28   -89.64   -89.27   -89.24   -89.72  129647   \n",
       "2     贵州茅台  600519  2001-08-29   -89.24   -89.36   -89.24   -89.42   53252   \n",
       "3     贵州茅台  600519  2001-08-30   -89.38   -89.22   -89.14   -89.44   48013   \n",
       "4     贵州茅台  600519  2001-08-31   -89.21   -89.24   -89.12   -89.28   23231   \n",
       "...    ...     ...         ...      ...      ...      ...      ...     ...   \n",
       "4617  贵州茅台  600519  2020-12-25  1783.70  1810.71  1827.71  1780.71   23088   \n",
       "4618  贵州茅台  600519  2020-12-28  1807.31  1853.71  1869.51  1806.76   30080   \n",
       "4619  贵州茅台  600519  2020-12-29  1853.71  1847.71  1867.51  1835.71   22868   \n",
       "4620  贵州茅台  600519  2020-12-30  1850.71  1913.71  1913.71  1850.70   34452   \n",
       "4621  贵州茅台  600519  2020-12-31  1921.71  1978.71  1979.69  1919.71   38860   \n",
       "\n",
       "               成交额    振幅   涨跌幅    涨跌额    换手率  \n",
       "0     1.410347e+09 -1.10  0.92   0.83  56.83  \n",
       "1     4.634630e+08 -0.54  0.29   0.26  18.13  \n",
       "2     1.946890e+08 -0.20 -0.10  -0.09   7.45  \n",
       "3     1.775580e+08 -0.34  0.16   0.14   6.72  \n",
       "4     8.623100e+07 -0.18 -0.02  -0.02   3.25  \n",
       "...            ...   ...   ...    ...    ...  \n",
       "4617  4.218998e+09  2.60 -0.02  -0.34   0.18  \n",
       "4618  5.616529e+09  3.47  2.37  43.00   0.24  \n",
       "4619  4.275995e+09  1.72 -0.32  -6.00   0.18  \n",
       "4620  6.604461e+09  3.41  3.57  66.00   0.27  \n",
       "4621  7.682301e+09  3.13  3.40  65.00   0.31  \n",
       "\n",
       "[4622 rows x 13 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票名称</th>\n",
       "      <th>股票代码</th>\n",
       "      <th>日期</th>\n",
       "      <th>开盘</th>\n",
       "      <th>收盘</th>\n",
       "      <th>最高</th>\n",
       "      <th>最低</th>\n",
       "      <th>成交量</th>\n",
       "      <th>成交额</th>\n",
       "      <th>振幅</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>涨跌额</th>\n",
       "      <th>换手率</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-27</td>\n",
       "      <td>-89.74</td>\n",
       "      <td>-89.53</td>\n",
       "      <td>-89.08</td>\n",
       "      <td>-90.07</td>\n",
       "      <td>406318</td>\n",
       "      <td>1.410347e+09</td>\n",
       "      <td>-1.10</td>\n",
       "      <td>0.92</td>\n",
       "      <td>0.83</td>\n",
       "      <td>56.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-28</td>\n",
       "      <td>-89.64</td>\n",
       "      <td>-89.27</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.72</td>\n",
       "      <td>129647</td>\n",
       "      <td>4.634630e+08</td>\n",
       "      <td>-0.54</td>\n",
       "      <td>0.29</td>\n",
       "      <td>0.26</td>\n",
       "      <td>18.13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-29</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.36</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.42</td>\n",
       "      <td>53252</td>\n",
       "      <td>1.946890e+08</td>\n",
       "      <td>-0.20</td>\n",
       "      <td>-0.10</td>\n",
       "      <td>-0.09</td>\n",
       "      <td>7.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-30</td>\n",
       "      <td>-89.38</td>\n",
       "      <td>-89.22</td>\n",
       "      <td>-89.14</td>\n",
       "      <td>-89.44</td>\n",
       "      <td>48013</td>\n",
       "      <td>1.775580e+08</td>\n",
       "      <td>-0.34</td>\n",
       "      <td>0.16</td>\n",
       "      <td>0.14</td>\n",
       "      <td>6.72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2001-08-31</td>\n",
       "      <td>-89.21</td>\n",
       "      <td>-89.24</td>\n",
       "      <td>-89.12</td>\n",
       "      <td>-89.28</td>\n",
       "      <td>23231</td>\n",
       "      <td>8.623100e+07</td>\n",
       "      <td>-0.18</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>3.25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4617</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-25</td>\n",
       "      <td>1783.70</td>\n",
       "      <td>1810.71</td>\n",
       "      <td>1827.71</td>\n",
       "      <td>1780.71</td>\n",
       "      <td>23088</td>\n",
       "      <td>4.218998e+09</td>\n",
       "      <td>2.60</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>-0.34</td>\n",
       "      <td>0.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4618</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-28</td>\n",
       "      <td>1807.31</td>\n",
       "      <td>1853.71</td>\n",
       "      <td>1869.51</td>\n",
       "      <td>1806.76</td>\n",
       "      <td>30080</td>\n",
       "      <td>5.616529e+09</td>\n",
       "      <td>3.47</td>\n",
       "      <td>2.37</td>\n",
       "      <td>43.00</td>\n",
       "      <td>0.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4619</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-29</td>\n",
       "      <td>1853.71</td>\n",
       "      <td>1847.71</td>\n",
       "      <td>1867.51</td>\n",
       "      <td>1835.71</td>\n",
       "      <td>22868</td>\n",
       "      <td>4.275995e+09</td>\n",
       "      <td>1.72</td>\n",
       "      <td>-0.32</td>\n",
       "      <td>-6.00</td>\n",
       "      <td>0.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4620</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-30</td>\n",
       "      <td>1850.71</td>\n",
       "      <td>1913.71</td>\n",
       "      <td>1913.71</td>\n",
       "      <td>1850.70</td>\n",
       "      <td>34452</td>\n",
       "      <td>6.604461e+09</td>\n",
       "      <td>3.41</td>\n",
       "      <td>3.57</td>\n",
       "      <td>66.00</td>\n",
       "      <td>0.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4621</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2020-12-31</td>\n",
       "      <td>1921.71</td>\n",
       "      <td>1978.71</td>\n",
       "      <td>1979.69</td>\n",
       "      <td>1919.71</td>\n",
       "      <td>38860</td>\n",
       "      <td>7.682301e+09</td>\n",
       "      <td>3.13</td>\n",
       "      <td>3.40</td>\n",
       "      <td>65.00</td>\n",
       "      <td>0.31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4622 rows × 13 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 9
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 沪深市场股票最新季度业绩表现\r\n"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "source": [
    "import efinance as ef\r\n",
    "ef.stock.get_all_company_performance()"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "        股票代码  股票简称                 公告日期          营业收入    营业收入同比增长  营业收入季度环比  \\\n",
       "0     688799  华纳药厂  2021-08-30 00:00:00  5.194802e+08   34.227814   19.0525   \n",
       "1     688697  纽威数控  2021-08-30 00:00:00  7.986240e+08   47.656165       NaN   \n",
       "2     688618  三旺通信  2021-08-30 00:00:00  1.054643e+08   23.672318   71.7003   \n",
       "3     688567  孚能科技  2021-08-30 00:00:00  8.770511e+08  207.256121   39.1811   \n",
       "4     688518  联赢激光  2021-08-30 00:00:00  5.243876e+08   73.146549   29.8116   \n",
       "...      ...   ...                  ...           ...         ...       ...   \n",
       "4006  600131  国网信通  2021-07-16 00:00:00  2.880378e+09    6.787087   69.5794   \n",
       "4007  600644  乐山电力  2021-07-15 00:00:00  1.257030e+09   18.079648    5.7300   \n",
       "4008  002261  拓维信息  2021-07-15 00:00:00  8.901777e+08   47.505282   24.0732   \n",
       "4009  601952  苏垦农发  2021-07-13 00:00:00  4.544138e+09   11.754570   47.8758   \n",
       "4010  601568  北元集团  2021-07-09 00:00:00  6.031506e+09   32.543303   30.6352   \n",
       "\n",
       "               净利润     净利润同比增长   净利润季度环比    每股收益      每股净资产  净资产收益率  \\\n",
       "0     6.916667e+07   21.600000    6.6067  0.9800  10.415597    9.91   \n",
       "1     6.902427e+07   26.170000       NaN  0.2800   2.329215   12.91   \n",
       "2     2.520688e+07  -13.170000  236.6923  0.5000  13.413387    3.70   \n",
       "3    -2.263626e+08  -29.322674   71.5266 -0.2100   9.212178   -2.27   \n",
       "4     2.444206e+07  121.350000   -8.5724  0.0800   4.782286    1.68   \n",
       "...            ...         ...       ...     ...        ...     ...   \n",
       "4006  2.171389e+08   29.570000  296.2051  0.1800   4.063260    4.57   \n",
       "4007  8.379727e+07  -14.300000   25.0007  0.1556   3.112413    5.13   \n",
       "4008  6.071063e+07   68.320000   30.0596  0.0550   2.351598    2.37   \n",
       "4009  3.288132e+08    1.460000   83.1486  0.2400   3.888046    6.05   \n",
       "4010  1.167989e+09   61.050000   40.8165  0.3200   3.541533    9.01   \n",
       "\n",
       "          销售毛利率  每股经营现金流量  \n",
       "0     72.160098  0.374232  \n",
       "1     24.068031  0.242221  \n",
       "2     61.486354  0.163731  \n",
       "3      5.277056 -0.187251  \n",
       "4     36.603566  0.220454  \n",
       "...         ...       ...  \n",
       "4006  19.137437 -0.798689  \n",
       "4007  23.645137  0.200906  \n",
       "4008  37.047968 -0.131873  \n",
       "4009  15.491684 -0.173772  \n",
       "4010  27.879243  0.389860  \n",
       "\n",
       "[4011 rows x 14 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票简称</th>\n",
       "      <th>公告日期</th>\n",
       "      <th>营业收入</th>\n",
       "      <th>营业收入同比增长</th>\n",
       "      <th>营业收入季度环比</th>\n",
       "      <th>净利润</th>\n",
       "      <th>净利润同比增长</th>\n",
       "      <th>净利润季度环比</th>\n",
       "      <th>每股收益</th>\n",
       "      <th>每股净资产</th>\n",
       "      <th>净资产收益率</th>\n",
       "      <th>销售毛利率</th>\n",
       "      <th>每股经营现金流量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>688799</td>\n",
       "      <td>华纳药厂</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "      <td>5.194802e+08</td>\n",
       "      <td>34.227814</td>\n",
       "      <td>19.0525</td>\n",
       "      <td>6.916667e+07</td>\n",
       "      <td>21.600000</td>\n",
       "      <td>6.6067</td>\n",
       "      <td>0.9800</td>\n",
       "      <td>10.415597</td>\n",
       "      <td>9.91</td>\n",
       "      <td>72.160098</td>\n",
       "      <td>0.374232</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>688697</td>\n",
       "      <td>纽威数控</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "      <td>7.986240e+08</td>\n",
       "      <td>47.656165</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.902427e+07</td>\n",
       "      <td>26.170000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.2800</td>\n",
       "      <td>2.329215</td>\n",
       "      <td>12.91</td>\n",
       "      <td>24.068031</td>\n",
       "      <td>0.242221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>688618</td>\n",
       "      <td>三旺通信</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "      <td>1.054643e+08</td>\n",
       "      <td>23.672318</td>\n",
       "      <td>71.7003</td>\n",
       "      <td>2.520688e+07</td>\n",
       "      <td>-13.170000</td>\n",
       "      <td>236.6923</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>13.413387</td>\n",
       "      <td>3.70</td>\n",
       "      <td>61.486354</td>\n",
       "      <td>0.163731</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>688567</td>\n",
       "      <td>孚能科技</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "      <td>8.770511e+08</td>\n",
       "      <td>207.256121</td>\n",
       "      <td>39.1811</td>\n",
       "      <td>-2.263626e+08</td>\n",
       "      <td>-29.322674</td>\n",
       "      <td>71.5266</td>\n",
       "      <td>-0.2100</td>\n",
       "      <td>9.212178</td>\n",
       "      <td>-2.27</td>\n",
       "      <td>5.277056</td>\n",
       "      <td>-0.187251</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>688518</td>\n",
       "      <td>联赢激光</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "      <td>5.243876e+08</td>\n",
       "      <td>73.146549</td>\n",
       "      <td>29.8116</td>\n",
       "      <td>2.444206e+07</td>\n",
       "      <td>121.350000</td>\n",
       "      <td>-8.5724</td>\n",
       "      <td>0.0800</td>\n",
       "      <td>4.782286</td>\n",
       "      <td>1.68</td>\n",
       "      <td>36.603566</td>\n",
       "      <td>0.220454</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4006</th>\n",
       "      <td>600131</td>\n",
       "      <td>国网信通</td>\n",
       "      <td>2021-07-16 00:00:00</td>\n",
       "      <td>2.880378e+09</td>\n",
       "      <td>6.787087</td>\n",
       "      <td>69.5794</td>\n",
       "      <td>2.171389e+08</td>\n",
       "      <td>29.570000</td>\n",
       "      <td>296.2051</td>\n",
       "      <td>0.1800</td>\n",
       "      <td>4.063260</td>\n",
       "      <td>4.57</td>\n",
       "      <td>19.137437</td>\n",
       "      <td>-0.798689</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4007</th>\n",
       "      <td>600644</td>\n",
       "      <td>乐山电力</td>\n",
       "      <td>2021-07-15 00:00:00</td>\n",
       "      <td>1.257030e+09</td>\n",
       "      <td>18.079648</td>\n",
       "      <td>5.7300</td>\n",
       "      <td>8.379727e+07</td>\n",
       "      <td>-14.300000</td>\n",
       "      <td>25.0007</td>\n",
       "      <td>0.1556</td>\n",
       "      <td>3.112413</td>\n",
       "      <td>5.13</td>\n",
       "      <td>23.645137</td>\n",
       "      <td>0.200906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4008</th>\n",
       "      <td>002261</td>\n",
       "      <td>拓维信息</td>\n",
       "      <td>2021-07-15 00:00:00</td>\n",
       "      <td>8.901777e+08</td>\n",
       "      <td>47.505282</td>\n",
       "      <td>24.0732</td>\n",
       "      <td>6.071063e+07</td>\n",
       "      <td>68.320000</td>\n",
       "      <td>30.0596</td>\n",
       "      <td>0.0550</td>\n",
       "      <td>2.351598</td>\n",
       "      <td>2.37</td>\n",
       "      <td>37.047968</td>\n",
       "      <td>-0.131873</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4009</th>\n",
       "      <td>601952</td>\n",
       "      <td>苏垦农发</td>\n",
       "      <td>2021-07-13 00:00:00</td>\n",
       "      <td>4.544138e+09</td>\n",
       "      <td>11.754570</td>\n",
       "      <td>47.8758</td>\n",
       "      <td>3.288132e+08</td>\n",
       "      <td>1.460000</td>\n",
       "      <td>83.1486</td>\n",
       "      <td>0.2400</td>\n",
       "      <td>3.888046</td>\n",
       "      <td>6.05</td>\n",
       "      <td>15.491684</td>\n",
       "      <td>-0.173772</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4010</th>\n",
       "      <td>601568</td>\n",
       "      <td>北元集团</td>\n",
       "      <td>2021-07-09 00:00:00</td>\n",
       "      <td>6.031506e+09</td>\n",
       "      <td>32.543303</td>\n",
       "      <td>30.6352</td>\n",
       "      <td>1.167989e+09</td>\n",
       "      <td>61.050000</td>\n",
       "      <td>40.8165</td>\n",
       "      <td>0.3200</td>\n",
       "      <td>3.541533</td>\n",
       "      <td>9.01</td>\n",
       "      <td>27.879243</td>\n",
       "      <td>0.389860</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4011 rows × 14 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 10
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 沪深市场股票指定日期的季度业绩表现\r\n"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "source": [
    "import efinance as ef\r\n",
    "ef.stock.get_all_company_performance(date='2021-03-31')"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "        股票代码  股票简称                 公告日期          营业收入    营业收入同比增长  营业收入季度环比  \\\n",
       "0     605033  美邦股份  2021-08-25 00:00:00  2.745798e+08   26.057649       NaN   \n",
       "1     688728   格科微  2021-07-30 00:00:00  1.937567e+09   55.296902    7.2463   \n",
       "2     301048  金鹰重工  2021-07-30 00:00:00  6.626118e+08  622.939051       NaN   \n",
       "3     301047  义翘神州  2021-07-30 00:00:00  4.565855e+08  311.160945  -13.4857   \n",
       "4     688733   壹石通  2021-07-29 00:00:00  7.290342e+07         NaN       NaN   \n",
       "...      ...   ...                  ...           ...         ...       ...   \n",
       "4441  000928  中钢国际  2021-04-09 00:00:00  2.772485e+09   35.850545  -51.5781   \n",
       "4442  000790  华神科技  2021-04-09 00:00:00  1.485114e+08   14.920461  -34.0759   \n",
       "4443  300584  海辰药业  2021-04-08 00:00:00  1.622036e+08   -2.389353    2.4390   \n",
       "4444  002825  纳尔股份  2021-04-08 00:00:00  3.674302e+08   73.198082   -7.1282   \n",
       "4445  002107  沃华医药  2021-04-07 00:00:00  2.524712e+08   15.787225   -1.2135   \n",
       "\n",
       "               净利润      净利润同比增长  净利润季度环比    每股收益      每股净资产  净资产收益率  \\\n",
       "0     4.657619e+07     7.819901      NaN  0.4600   4.890950    9.85   \n",
       "1     2.921972e+08    48.691336  96.9490  0.1300   1.126685   10.18   \n",
       "2     6.502268e+07   396.908689      NaN  0.1600   3.523889    4.72   \n",
       "3     3.322075e+08   417.919173 -11.8844  6.5100  31.975995   22.67   \n",
       "4     1.748394e+07          NaN      NaN  0.1300   3.679212    3.54   \n",
       "...            ...          ...      ...     ...        ...     ...   \n",
       "4441  1.226377e+08  1290.850000 -59.7903  0.0976   4.583237    2.15   \n",
       "4442  1.171571e+07    82.760000  75.9991  0.0200   1.498744    1.28   \n",
       "4443  1.350987e+07   -21.300000  96.0872  0.1126   5.775312    1.97   \n",
       "4444  2.137438e+07   156.970000  81.8976  0.1300   6.304156    2.18   \n",
       "4445  5.084300e+07    15.200000  33.3908  0.0900   1.486881    6.10   \n",
       "\n",
       "          销售毛利率  每股经营现金流量  \n",
       "0     35.727826 -1.247530  \n",
       "1     31.272208  0.139490  \n",
       "2     17.725787 -0.206652  \n",
       "3     96.830697  4.746849  \n",
       "4     42.588543 -0.166675  \n",
       "...         ...       ...  \n",
       "4441  11.679059 -1.717067  \n",
       "4442  62.801991 -0.093348  \n",
       "4443  81.107504  0.151283  \n",
       "4444  21.044165  0.077641  \n",
       "4445  79.928466  0.145504  \n",
       "\n",
       "[4446 rows x 14 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票简称</th>\n",
       "      <th>公告日期</th>\n",
       "      <th>营业收入</th>\n",
       "      <th>营业收入同比增长</th>\n",
       "      <th>营业收入季度环比</th>\n",
       "      <th>净利润</th>\n",
       "      <th>净利润同比增长</th>\n",
       "      <th>净利润季度环比</th>\n",
       "      <th>每股收益</th>\n",
       "      <th>每股净资产</th>\n",
       "      <th>净资产收益率</th>\n",
       "      <th>销售毛利率</th>\n",
       "      <th>每股经营现金流量</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>605033</td>\n",
       "      <td>美邦股份</td>\n",
       "      <td>2021-08-25 00:00:00</td>\n",
       "      <td>2.745798e+08</td>\n",
       "      <td>26.057649</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.657619e+07</td>\n",
       "      <td>7.819901</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.4600</td>\n",
       "      <td>4.890950</td>\n",
       "      <td>9.85</td>\n",
       "      <td>35.727826</td>\n",
       "      <td>-1.247530</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>688728</td>\n",
       "      <td>格科微</td>\n",
       "      <td>2021-07-30 00:00:00</td>\n",
       "      <td>1.937567e+09</td>\n",
       "      <td>55.296902</td>\n",
       "      <td>7.2463</td>\n",
       "      <td>2.921972e+08</td>\n",
       "      <td>48.691336</td>\n",
       "      <td>96.9490</td>\n",
       "      <td>0.1300</td>\n",
       "      <td>1.126685</td>\n",
       "      <td>10.18</td>\n",
       "      <td>31.272208</td>\n",
       "      <td>0.139490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>301048</td>\n",
       "      <td>金鹰重工</td>\n",
       "      <td>2021-07-30 00:00:00</td>\n",
       "      <td>6.626118e+08</td>\n",
       "      <td>622.939051</td>\n",
       "      <td>NaN</td>\n",
       "      <td>6.502268e+07</td>\n",
       "      <td>396.908689</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.1600</td>\n",
       "      <td>3.523889</td>\n",
       "      <td>4.72</td>\n",
       "      <td>17.725787</td>\n",
       "      <td>-0.206652</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>301047</td>\n",
       "      <td>义翘神州</td>\n",
       "      <td>2021-07-30 00:00:00</td>\n",
       "      <td>4.565855e+08</td>\n",
       "      <td>311.160945</td>\n",
       "      <td>-13.4857</td>\n",
       "      <td>3.322075e+08</td>\n",
       "      <td>417.919173</td>\n",
       "      <td>-11.8844</td>\n",
       "      <td>6.5100</td>\n",
       "      <td>31.975995</td>\n",
       "      <td>22.67</td>\n",
       "      <td>96.830697</td>\n",
       "      <td>4.746849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>688733</td>\n",
       "      <td>壹石通</td>\n",
       "      <td>2021-07-29 00:00:00</td>\n",
       "      <td>7.290342e+07</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.748394e+07</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.1300</td>\n",
       "      <td>3.679212</td>\n",
       "      <td>3.54</td>\n",
       "      <td>42.588543</td>\n",
       "      <td>-0.166675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4441</th>\n",
       "      <td>000928</td>\n",
       "      <td>中钢国际</td>\n",
       "      <td>2021-04-09 00:00:00</td>\n",
       "      <td>2.772485e+09</td>\n",
       "      <td>35.850545</td>\n",
       "      <td>-51.5781</td>\n",
       "      <td>1.226377e+08</td>\n",
       "      <td>1290.850000</td>\n",
       "      <td>-59.7903</td>\n",
       "      <td>0.0976</td>\n",
       "      <td>4.583237</td>\n",
       "      <td>2.15</td>\n",
       "      <td>11.679059</td>\n",
       "      <td>-1.717067</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4442</th>\n",
       "      <td>000790</td>\n",
       "      <td>华神科技</td>\n",
       "      <td>2021-04-09 00:00:00</td>\n",
       "      <td>1.485114e+08</td>\n",
       "      <td>14.920461</td>\n",
       "      <td>-34.0759</td>\n",
       "      <td>1.171571e+07</td>\n",
       "      <td>82.760000</td>\n",
       "      <td>75.9991</td>\n",
       "      <td>0.0200</td>\n",
       "      <td>1.498744</td>\n",
       "      <td>1.28</td>\n",
       "      <td>62.801991</td>\n",
       "      <td>-0.093348</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4443</th>\n",
       "      <td>300584</td>\n",
       "      <td>海辰药业</td>\n",
       "      <td>2021-04-08 00:00:00</td>\n",
       "      <td>1.622036e+08</td>\n",
       "      <td>-2.389353</td>\n",
       "      <td>2.4390</td>\n",
       "      <td>1.350987e+07</td>\n",
       "      <td>-21.300000</td>\n",
       "      <td>96.0872</td>\n",
       "      <td>0.1126</td>\n",
       "      <td>5.775312</td>\n",
       "      <td>1.97</td>\n",
       "      <td>81.107504</td>\n",
       "      <td>0.151283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4444</th>\n",
       "      <td>002825</td>\n",
       "      <td>纳尔股份</td>\n",
       "      <td>2021-04-08 00:00:00</td>\n",
       "      <td>3.674302e+08</td>\n",
       "      <td>73.198082</td>\n",
       "      <td>-7.1282</td>\n",
       "      <td>2.137438e+07</td>\n",
       "      <td>156.970000</td>\n",
       "      <td>81.8976</td>\n",
       "      <td>0.1300</td>\n",
       "      <td>6.304156</td>\n",
       "      <td>2.18</td>\n",
       "      <td>21.044165</td>\n",
       "      <td>0.077641</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4445</th>\n",
       "      <td>002107</td>\n",
       "      <td>沃华医药</td>\n",
       "      <td>2021-04-07 00:00:00</td>\n",
       "      <td>2.524712e+08</td>\n",
       "      <td>15.787225</td>\n",
       "      <td>-1.2135</td>\n",
       "      <td>5.084300e+07</td>\n",
       "      <td>15.200000</td>\n",
       "      <td>33.3908</td>\n",
       "      <td>0.0900</td>\n",
       "      <td>1.486881</td>\n",
       "      <td>6.10</td>\n",
       "      <td>79.928466</td>\n",
       "      <td>0.145504</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4446 rows × 14 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 11
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 股票最新交易日单子流入情况(分钟级)"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "source": [
    "import efinance as ef\r\n",
    "ef.stock.get_today_bill('600519')"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "     股票名称    股票代码                时间        主力净流入     小单净流入        中单净流入  \\\n",
       "0    贵州茅台  600519  2021-08-30 09:31   -1668134.0  -30415.0    1698549.0   \n",
       "1    贵州茅台  600519  2021-08-30 09:32   -9337263.0  -30415.0    9367678.0   \n",
       "2    贵州茅台  600519  2021-08-30 09:33  -26063866.0  -30415.0   26094280.0   \n",
       "3    贵州茅台  600519  2021-08-30 09:34  -33344105.0   29542.0   33314562.0   \n",
       "4    贵州茅台  600519  2021-08-30 09:35  -47656330.0   29542.0   47626786.0   \n",
       "..    ...     ...               ...          ...       ...          ...   \n",
       "186  贵州茅台  600519  2021-08-30 14:07 -348644498.0  901548.0  347742941.0   \n",
       "187  贵州茅台  600519  2021-08-30 14:08 -350226380.0  901548.0  349324823.0   \n",
       "188  贵州茅台  600519  2021-08-30 14:09 -349116980.0  901548.0  348215423.0   \n",
       "189  贵州茅台  600519  2021-08-30 14:10 -350697794.0  901548.0  349796237.0   \n",
       "190  贵州茅台  600519  2021-08-30 14:11 -350379372.0  901548.0  349477815.0   \n",
       "\n",
       "          大单净流入       超大单净流入  \n",
       "0    -5507909.0    3839775.0  \n",
       "1    -7110139.0   -2227124.0  \n",
       "2    -8726399.0  -17337467.0  \n",
       "3    -9031126.0  -24312979.0  \n",
       "4   -12164324.0  -35492006.0  \n",
       "..          ...          ...  \n",
       "186 -16961910.0 -331682588.0  \n",
       "187 -15379168.0 -334847212.0  \n",
       "188 -11580274.0 -337536706.0  \n",
       "189 -10155113.0 -340542681.0  \n",
       "190  -9836691.0 -340542681.0  \n",
       "\n",
       "[191 rows x 8 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票名称</th>\n",
       "      <th>股票代码</th>\n",
       "      <th>时间</th>\n",
       "      <th>主力净流入</th>\n",
       "      <th>小单净流入</th>\n",
       "      <th>中单净流入</th>\n",
       "      <th>大单净流入</th>\n",
       "      <th>超大单净流入</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 09:31</td>\n",
       "      <td>-1668134.0</td>\n",
       "      <td>-30415.0</td>\n",
       "      <td>1698549.0</td>\n",
       "      <td>-5507909.0</td>\n",
       "      <td>3839775.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 09:32</td>\n",
       "      <td>-9337263.0</td>\n",
       "      <td>-30415.0</td>\n",
       "      <td>9367678.0</td>\n",
       "      <td>-7110139.0</td>\n",
       "      <td>-2227124.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 09:33</td>\n",
       "      <td>-26063866.0</td>\n",
       "      <td>-30415.0</td>\n",
       "      <td>26094280.0</td>\n",
       "      <td>-8726399.0</td>\n",
       "      <td>-17337467.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 09:34</td>\n",
       "      <td>-33344105.0</td>\n",
       "      <td>29542.0</td>\n",
       "      <td>33314562.0</td>\n",
       "      <td>-9031126.0</td>\n",
       "      <td>-24312979.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 09:35</td>\n",
       "      <td>-47656330.0</td>\n",
       "      <td>29542.0</td>\n",
       "      <td>47626786.0</td>\n",
       "      <td>-12164324.0</td>\n",
       "      <td>-35492006.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>186</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:07</td>\n",
       "      <td>-348644498.0</td>\n",
       "      <td>901548.0</td>\n",
       "      <td>347742941.0</td>\n",
       "      <td>-16961910.0</td>\n",
       "      <td>-331682588.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>187</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:08</td>\n",
       "      <td>-350226380.0</td>\n",
       "      <td>901548.0</td>\n",
       "      <td>349324823.0</td>\n",
       "      <td>-15379168.0</td>\n",
       "      <td>-334847212.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>188</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:09</td>\n",
       "      <td>-349116980.0</td>\n",
       "      <td>901548.0</td>\n",
       "      <td>348215423.0</td>\n",
       "      <td>-11580274.0</td>\n",
       "      <td>-337536706.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>189</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:10</td>\n",
       "      <td>-350697794.0</td>\n",
       "      <td>901548.0</td>\n",
       "      <td>349796237.0</td>\n",
       "      <td>-10155113.0</td>\n",
       "      <td>-340542681.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>190</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-30 14:11</td>\n",
       "      <td>-350379372.0</td>\n",
       "      <td>901548.0</td>\n",
       "      <td>349477815.0</td>\n",
       "      <td>-9836691.0</td>\n",
       "      <td>-340542681.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>191 rows × 8 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 12
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 股票历史交易日单子流入情况(日级)"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "source": [
    "import efinance as ef\r\n",
    "ef.stock.get_history_bill('600519')"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "     股票名称    股票代码          日期        主力净流入      小单净流入        中单净流入  \\\n",
       "0    贵州茅台  600519  2021-04-02   22415648.0 -1399994.0  -21015746.0   \n",
       "1    贵州茅台  600519  2021-04-06   -5732496.0  -950673.0    6683160.0   \n",
       "2    贵州茅台  600519  2021-04-07  -41035248.0  1495507.0   39539649.0   \n",
       "3    贵州茅台  600519  2021-04-08  -12959200.0 -1917587.0   14876795.0   \n",
       "4    贵州茅台  600519  2021-04-09  -19368960.0   422017.0   18946942.0   \n",
       "..    ...     ...         ...          ...        ...          ...   \n",
       "96   贵州茅台  600519  2021-08-23  295886672.0 -4812064.0 -291074592.0   \n",
       "97   贵州茅台  600519  2021-08-24  518892080.0 -9811615.0 -509080464.0   \n",
       "98   贵州茅台  600519  2021-08-25   70324384.0 -1277551.0  -69046848.0   \n",
       "99   贵州茅台  600519  2021-08-26 -669216880.0 -2813337.0  672030224.0   \n",
       "100  贵州茅台  600519  2021-08-27 -156175696.0  -938272.0  157113968.0   \n",
       "\n",
       "            大单净流入        超大单净流入  主力净流入占比  小单流入净占比  中单流入净占比  大单流入净占比  超大单流入净占比  \\\n",
       "0   -1.602662e+09  1.625078e+09     0.20    -0.01    -0.19   -14.59     14.80   \n",
       "1    6.970202e+07 -7.543451e+07    -0.08    -0.01     0.10     1.00     -1.08   \n",
       "2    6.026660e+08 -6.437012e+08    -0.49     0.02     0.48     7.25     -7.74   \n",
       "3   -4.111168e+08  3.981576e+08    -0.22    -0.03     0.25    -6.98      6.76   \n",
       "4    5.963018e+08 -6.156708e+08    -0.33     0.01     0.32    10.22    -10.56   \n",
       "..            ...           ...      ...      ...      ...      ...       ...   \n",
       "96   8.685579e+07  2.090309e+08     2.64    -0.04    -2.59     0.77      1.86   \n",
       "97   1.116964e+08  4.071956e+08     4.43    -0.08    -4.35     0.95      3.48   \n",
       "98  -2.118487e+08  2.821731e+08     0.78    -0.01    -0.76    -2.34      3.12   \n",
       "99  -1.682641e+08 -5.009528e+08    -7.67    -0.03     7.70    -1.93     -5.74   \n",
       "100  4.893088e+06 -1.610688e+08    -2.70    -0.02     2.71     0.08     -2.78   \n",
       "\n",
       "         收盘价   涨跌幅  \n",
       "0    2142.71  5.80  \n",
       "1    2106.74 -1.68  \n",
       "2    2041.71 -3.09  \n",
       "3    2050.71  0.44  \n",
       "4    2000.71 -2.44  \n",
       "..       ...   ...  \n",
       "96   1570.19  1.43  \n",
       "97   1625.18  3.50  \n",
       "98   1665.02  2.45  \n",
       "99   1595.00 -4.21  \n",
       "100  1596.03  0.06  \n",
       "\n",
       "[101 rows x 15 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票名称</th>\n",
       "      <th>股票代码</th>\n",
       "      <th>日期</th>\n",
       "      <th>主力净流入</th>\n",
       "      <th>小单净流入</th>\n",
       "      <th>中单净流入</th>\n",
       "      <th>大单净流入</th>\n",
       "      <th>超大单净流入</th>\n",
       "      <th>主力净流入占比</th>\n",
       "      <th>小单流入净占比</th>\n",
       "      <th>中单流入净占比</th>\n",
       "      <th>大单流入净占比</th>\n",
       "      <th>超大单流入净占比</th>\n",
       "      <th>收盘价</th>\n",
       "      <th>涨跌幅</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-04-02</td>\n",
       "      <td>22415648.0</td>\n",
       "      <td>-1399994.0</td>\n",
       "      <td>-21015746.0</td>\n",
       "      <td>-1.602662e+09</td>\n",
       "      <td>1.625078e+09</td>\n",
       "      <td>0.20</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>-0.19</td>\n",
       "      <td>-14.59</td>\n",
       "      <td>14.80</td>\n",
       "      <td>2142.71</td>\n",
       "      <td>5.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-04-06</td>\n",
       "      <td>-5732496.0</td>\n",
       "      <td>-950673.0</td>\n",
       "      <td>6683160.0</td>\n",
       "      <td>6.970202e+07</td>\n",
       "      <td>-7.543451e+07</td>\n",
       "      <td>-0.08</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>0.10</td>\n",
       "      <td>1.00</td>\n",
       "      <td>-1.08</td>\n",
       "      <td>2106.74</td>\n",
       "      <td>-1.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-04-07</td>\n",
       "      <td>-41035248.0</td>\n",
       "      <td>1495507.0</td>\n",
       "      <td>39539649.0</td>\n",
       "      <td>6.026660e+08</td>\n",
       "      <td>-6.437012e+08</td>\n",
       "      <td>-0.49</td>\n",
       "      <td>0.02</td>\n",
       "      <td>0.48</td>\n",
       "      <td>7.25</td>\n",
       "      <td>-7.74</td>\n",
       "      <td>2041.71</td>\n",
       "      <td>-3.09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-04-08</td>\n",
       "      <td>-12959200.0</td>\n",
       "      <td>-1917587.0</td>\n",
       "      <td>14876795.0</td>\n",
       "      <td>-4.111168e+08</td>\n",
       "      <td>3.981576e+08</td>\n",
       "      <td>-0.22</td>\n",
       "      <td>-0.03</td>\n",
       "      <td>0.25</td>\n",
       "      <td>-6.98</td>\n",
       "      <td>6.76</td>\n",
       "      <td>2050.71</td>\n",
       "      <td>0.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-04-09</td>\n",
       "      <td>-19368960.0</td>\n",
       "      <td>422017.0</td>\n",
       "      <td>18946942.0</td>\n",
       "      <td>5.963018e+08</td>\n",
       "      <td>-6.156708e+08</td>\n",
       "      <td>-0.33</td>\n",
       "      <td>0.01</td>\n",
       "      <td>0.32</td>\n",
       "      <td>10.22</td>\n",
       "      <td>-10.56</td>\n",
       "      <td>2000.71</td>\n",
       "      <td>-2.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-23</td>\n",
       "      <td>295886672.0</td>\n",
       "      <td>-4812064.0</td>\n",
       "      <td>-291074592.0</td>\n",
       "      <td>8.685579e+07</td>\n",
       "      <td>2.090309e+08</td>\n",
       "      <td>2.64</td>\n",
       "      <td>-0.04</td>\n",
       "      <td>-2.59</td>\n",
       "      <td>0.77</td>\n",
       "      <td>1.86</td>\n",
       "      <td>1570.19</td>\n",
       "      <td>1.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-24</td>\n",
       "      <td>518892080.0</td>\n",
       "      <td>-9811615.0</td>\n",
       "      <td>-509080464.0</td>\n",
       "      <td>1.116964e+08</td>\n",
       "      <td>4.071956e+08</td>\n",
       "      <td>4.43</td>\n",
       "      <td>-0.08</td>\n",
       "      <td>-4.35</td>\n",
       "      <td>0.95</td>\n",
       "      <td>3.48</td>\n",
       "      <td>1625.18</td>\n",
       "      <td>3.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-25</td>\n",
       "      <td>70324384.0</td>\n",
       "      <td>-1277551.0</td>\n",
       "      <td>-69046848.0</td>\n",
       "      <td>-2.118487e+08</td>\n",
       "      <td>2.821731e+08</td>\n",
       "      <td>0.78</td>\n",
       "      <td>-0.01</td>\n",
       "      <td>-0.76</td>\n",
       "      <td>-2.34</td>\n",
       "      <td>3.12</td>\n",
       "      <td>1665.02</td>\n",
       "      <td>2.45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-26</td>\n",
       "      <td>-669216880.0</td>\n",
       "      <td>-2813337.0</td>\n",
       "      <td>672030224.0</td>\n",
       "      <td>-1.682641e+08</td>\n",
       "      <td>-5.009528e+08</td>\n",
       "      <td>-7.67</td>\n",
       "      <td>-0.03</td>\n",
       "      <td>7.70</td>\n",
       "      <td>-1.93</td>\n",
       "      <td>-5.74</td>\n",
       "      <td>1595.00</td>\n",
       "      <td>-4.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>贵州茅台</td>\n",
       "      <td>600519</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>-156175696.0</td>\n",
       "      <td>-938272.0</td>\n",
       "      <td>157113968.0</td>\n",
       "      <td>4.893088e+06</td>\n",
       "      <td>-1.610688e+08</td>\n",
       "      <td>-2.70</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>2.71</td>\n",
       "      <td>0.08</td>\n",
       "      <td>-2.78</td>\n",
       "      <td>1596.03</td>\n",
       "      <td>0.06</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>101 rows × 15 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 13
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 股票最新龙虎榜"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "source": [
    "ef.stock.get_daily_billboard()"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "      股票代码  股票名称        上榜日期                解读     收盘价      涨跌幅      换手率  \\\n",
       "0   000608  阳光股份  2021-08-27    卖一主卖，成功率48.36%    3.73  -9.9034   3.8430   \n",
       "1   000751  锌业股份  2021-08-27    主力做T，成功率18.84%    5.32  -2.9197  19.6505   \n",
       "2   000762  西藏矿业  2021-08-27  北京资金买入，成功率39.42%   63.99   1.0741  15.6463   \n",
       "3   000833  粤桂股份  2021-08-27  实力游资买入，成功率44.55%    8.87  10.0496   8.8263   \n",
       "4   001208  华菱线缆  2021-08-27  1家机构买入，成功率40.43%   19.72   4.3386  46.1985   \n",
       "..     ...   ...         ...               ...     ...      ...      ...   \n",
       "70  688558  国盛智科  2021-08-27    买一主买，成功率38.71%   60.72   1.6064  34.0104   \n",
       "71  688596  正帆科技  2021-08-27  1家机构买入，成功率57.67%   26.72   3.1660   3.9065   \n",
       "72  688663   新风光  2021-08-27    卖一主卖，成功率37.18%   28.17 -17.6316  32.2409   \n",
       "73  688663   新风光  2021-08-27    卖一主卖，成功率37.18%   28.17 -17.6316  32.2409   \n",
       "74  688667  菱电电控  2021-08-27  1家机构卖出，成功率49.69%  123.37 -18.8996  17.7701   \n",
       "\n",
       "          龙虎榜净买额        龙虎榜买入额        龙虎榜卖出额        龙虎榜成交额      市场总成交额  \\\n",
       "0  -8.709942e+06  1.422786e+07  2.293780e+07  3.716565e+07   110838793   \n",
       "1  -1.079219e+08  5.638899e+07  1.643109e+08  2.206999e+08  1462953973   \n",
       "2   2.938758e+07  4.675541e+08  4.381665e+08  9.057206e+08  4959962598   \n",
       "3   4.993555e+07  1.292967e+08  7.936120e+07  2.086580e+08   895910429   \n",
       "4   4.055258e+07  1.537821e+08  1.132295e+08  2.670117e+08  1203913048   \n",
       "..           ...           ...           ...           ...         ...   \n",
       "70  1.835494e+07  1.057779e+08  8.742293e+07  1.932008e+08   802569300   \n",
       "71 -1.371039e+07  8.409046e+07  9.780085e+07  1.818913e+08   745137400   \n",
       "72  1.036460e+07  5.416901e+07  4.380440e+07  9.797341e+07   274732700   \n",
       "73  1.036460e+07  5.416901e+07  4.380440e+07  9.797341e+07   274732700   \n",
       "74 -2.079877e+06  4.611216e+07  4.819204e+07  9.430420e+07   268503400   \n",
       "\n",
       "    净买额占总成交比   成交额占总成交比          流通市值                                  上榜原因  \n",
       "0  -7.858208  33.531268  2.796761e+09                      日跌幅偏离值达到7%的前5只证券  \n",
       "1  -7.376984  15.085906  7.500502e+09                       日振幅值达到15%的前5只证券  \n",
       "2   0.592496  18.260633  3.332571e+10                       日振幅值达到15%的前5只证券  \n",
       "3   5.573721  23.290046  3.353614e+09              连续三个交易日内，涨幅偏离值累计达到20%的证券  \n",
       "4   3.368398  22.178651  2.634710e+09                       日换手率达到20%的前5只证券  \n",
       "..       ...        ...           ...                                   ...  \n",
       "70  2.287023  24.072789  2.321743e+09              有价格涨跌幅限制的日换手率达到30%的前五只证券  \n",
       "71 -1.839982  24.410438  4.630550e+09  有价格涨跌幅限制的连续3个交易日内收盘价格涨幅偏离值累计达到30%的证券  \n",
       "72  3.772613  35.661358  8.492507e+08           有价格涨跌幅限制的日收盘价格跌幅达到15%的前五只证券  \n",
       "73  3.772613  35.661358  8.492507e+08              有价格涨跌幅限制的日换手率达到30%的前五只证券  \n",
       "74 -0.774618  35.122163  1.461225e+09           有价格涨跌幅限制的日收盘价格跌幅达到15%的前五只证券  \n",
       "\n",
       "[75 rows x 16 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>上榜日期</th>\n",
       "      <th>解读</th>\n",
       "      <th>收盘价</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>换手率</th>\n",
       "      <th>龙虎榜净买额</th>\n",
       "      <th>龙虎榜买入额</th>\n",
       "      <th>龙虎榜卖出额</th>\n",
       "      <th>龙虎榜成交额</th>\n",
       "      <th>市场总成交额</th>\n",
       "      <th>净买额占总成交比</th>\n",
       "      <th>成交额占总成交比</th>\n",
       "      <th>流通市值</th>\n",
       "      <th>上榜原因</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000608</td>\n",
       "      <td>阳光股份</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>卖一主卖，成功率48.36%</td>\n",
       "      <td>3.73</td>\n",
       "      <td>-9.9034</td>\n",
       "      <td>3.8430</td>\n",
       "      <td>-8.709942e+06</td>\n",
       "      <td>1.422786e+07</td>\n",
       "      <td>2.293780e+07</td>\n",
       "      <td>3.716565e+07</td>\n",
       "      <td>110838793</td>\n",
       "      <td>-7.858208</td>\n",
       "      <td>33.531268</td>\n",
       "      <td>2.796761e+09</td>\n",
       "      <td>日跌幅偏离值达到7%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000751</td>\n",
       "      <td>锌业股份</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>主力做T，成功率18.84%</td>\n",
       "      <td>5.32</td>\n",
       "      <td>-2.9197</td>\n",
       "      <td>19.6505</td>\n",
       "      <td>-1.079219e+08</td>\n",
       "      <td>5.638899e+07</td>\n",
       "      <td>1.643109e+08</td>\n",
       "      <td>2.206999e+08</td>\n",
       "      <td>1462953973</td>\n",
       "      <td>-7.376984</td>\n",
       "      <td>15.085906</td>\n",
       "      <td>7.500502e+09</td>\n",
       "      <td>日振幅值达到15%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000762</td>\n",
       "      <td>西藏矿业</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>北京资金买入，成功率39.42%</td>\n",
       "      <td>63.99</td>\n",
       "      <td>1.0741</td>\n",
       "      <td>15.6463</td>\n",
       "      <td>2.938758e+07</td>\n",
       "      <td>4.675541e+08</td>\n",
       "      <td>4.381665e+08</td>\n",
       "      <td>9.057206e+08</td>\n",
       "      <td>4959962598</td>\n",
       "      <td>0.592496</td>\n",
       "      <td>18.260633</td>\n",
       "      <td>3.332571e+10</td>\n",
       "      <td>日振幅值达到15%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>000833</td>\n",
       "      <td>粤桂股份</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>实力游资买入，成功率44.55%</td>\n",
       "      <td>8.87</td>\n",
       "      <td>10.0496</td>\n",
       "      <td>8.8263</td>\n",
       "      <td>4.993555e+07</td>\n",
       "      <td>1.292967e+08</td>\n",
       "      <td>7.936120e+07</td>\n",
       "      <td>2.086580e+08</td>\n",
       "      <td>895910429</td>\n",
       "      <td>5.573721</td>\n",
       "      <td>23.290046</td>\n",
       "      <td>3.353614e+09</td>\n",
       "      <td>连续三个交易日内，涨幅偏离值累计达到20%的证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>001208</td>\n",
       "      <td>华菱线缆</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>1家机构买入，成功率40.43%</td>\n",
       "      <td>19.72</td>\n",
       "      <td>4.3386</td>\n",
       "      <td>46.1985</td>\n",
       "      <td>4.055258e+07</td>\n",
       "      <td>1.537821e+08</td>\n",
       "      <td>1.132295e+08</td>\n",
       "      <td>2.670117e+08</td>\n",
       "      <td>1203913048</td>\n",
       "      <td>3.368398</td>\n",
       "      <td>22.178651</td>\n",
       "      <td>2.634710e+09</td>\n",
       "      <td>日换手率达到20%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>688558</td>\n",
       "      <td>国盛智科</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>买一主买，成功率38.71%</td>\n",
       "      <td>60.72</td>\n",
       "      <td>1.6064</td>\n",
       "      <td>34.0104</td>\n",
       "      <td>1.835494e+07</td>\n",
       "      <td>1.057779e+08</td>\n",
       "      <td>8.742293e+07</td>\n",
       "      <td>1.932008e+08</td>\n",
       "      <td>802569300</td>\n",
       "      <td>2.287023</td>\n",
       "      <td>24.072789</td>\n",
       "      <td>2.321743e+09</td>\n",
       "      <td>有价格涨跌幅限制的日换手率达到30%的前五只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>688596</td>\n",
       "      <td>正帆科技</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>1家机构买入，成功率57.67%</td>\n",
       "      <td>26.72</td>\n",
       "      <td>3.1660</td>\n",
       "      <td>3.9065</td>\n",
       "      <td>-1.371039e+07</td>\n",
       "      <td>8.409046e+07</td>\n",
       "      <td>9.780085e+07</td>\n",
       "      <td>1.818913e+08</td>\n",
       "      <td>745137400</td>\n",
       "      <td>-1.839982</td>\n",
       "      <td>24.410438</td>\n",
       "      <td>4.630550e+09</td>\n",
       "      <td>有价格涨跌幅限制的连续3个交易日内收盘价格涨幅偏离值累计达到30%的证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>688663</td>\n",
       "      <td>新风光</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>卖一主卖，成功率37.18%</td>\n",
       "      <td>28.17</td>\n",
       "      <td>-17.6316</td>\n",
       "      <td>32.2409</td>\n",
       "      <td>1.036460e+07</td>\n",
       "      <td>5.416901e+07</td>\n",
       "      <td>4.380440e+07</td>\n",
       "      <td>9.797341e+07</td>\n",
       "      <td>274732700</td>\n",
       "      <td>3.772613</td>\n",
       "      <td>35.661358</td>\n",
       "      <td>8.492507e+08</td>\n",
       "      <td>有价格涨跌幅限制的日收盘价格跌幅达到15%的前五只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>688663</td>\n",
       "      <td>新风光</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>卖一主卖，成功率37.18%</td>\n",
       "      <td>28.17</td>\n",
       "      <td>-17.6316</td>\n",
       "      <td>32.2409</td>\n",
       "      <td>1.036460e+07</td>\n",
       "      <td>5.416901e+07</td>\n",
       "      <td>4.380440e+07</td>\n",
       "      <td>9.797341e+07</td>\n",
       "      <td>274732700</td>\n",
       "      <td>3.772613</td>\n",
       "      <td>35.661358</td>\n",
       "      <td>8.492507e+08</td>\n",
       "      <td>有价格涨跌幅限制的日换手率达到30%的前五只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>688667</td>\n",
       "      <td>菱电电控</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>1家机构卖出，成功率49.69%</td>\n",
       "      <td>123.37</td>\n",
       "      <td>-18.8996</td>\n",
       "      <td>17.7701</td>\n",
       "      <td>-2.079877e+06</td>\n",
       "      <td>4.611216e+07</td>\n",
       "      <td>4.819204e+07</td>\n",
       "      <td>9.430420e+07</td>\n",
       "      <td>268503400</td>\n",
       "      <td>-0.774618</td>\n",
       "      <td>35.122163</td>\n",
       "      <td>1.461225e+09</td>\n",
       "      <td>有价格涨跌幅限制的日收盘价格跌幅达到15%的前五只证券</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>75 rows × 16 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 14
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 指定日期区间的股票龙虎榜"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "source": [
    "# 开始日期\r\n",
    "start_date = '2021-08-20'\r\n",
    "# 结束日期\r\n",
    "end_date = '2021-08-27'\r\n",
    "ef.stock.get_daily_billboard(start_date=start_date,\r\n",
    "                             end_date=end_date)\r\n"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "       股票代码  股票名称        上榜日期                解读     收盘价      涨跌幅      换手率  \\\n",
       "0    000608  阳光股份  2021-08-27    卖一主卖，成功率48.36%    3.73  -9.9034   3.8430   \n",
       "1    000751  锌业股份  2021-08-27    主力做T，成功率18.84%    5.32  -2.9197  19.6505   \n",
       "2    000762  西藏矿业  2021-08-27  北京资金买入，成功率39.42%   63.99   1.0741  15.6463   \n",
       "3    000833  粤桂股份  2021-08-27  实力游资买入，成功率44.55%    8.87  10.0496   8.8263   \n",
       "4    001208  华菱线缆  2021-08-27  1家机构买入，成功率40.43%   19.72   4.3386  46.1985   \n",
       "..      ...   ...         ...               ...     ...      ...      ...   \n",
       "414  605580  恒盛能源  2021-08-20    买一主买，成功率33.33%   13.28  10.0249   0.4086   \n",
       "415  688029  南微医学  2021-08-20  4家机构卖出，成功率55.82%  204.61 -18.5340   8.1809   \n",
       "416  688408   中信博  2021-08-20  4家机构卖出，成功率47.86%  179.98  -0.0666  15.3723   \n",
       "417  688556  高测股份  2021-08-20  上海资金买入，成功率60.21%   51.97  17.0495  10.6452   \n",
       "418  688636   智明达  2021-08-20  2家机构买入，成功率47.37%  161.90  15.8332  11.9578   \n",
       "\n",
       "           龙虎榜净买额        龙虎榜买入额        龙虎榜卖出额        龙虎榜成交额      市场总成交额  \\\n",
       "0   -8.709942e+06  1.422786e+07  2.293780e+07  3.716565e+07   110838793   \n",
       "1   -1.079219e+08  5.638899e+07  1.643109e+08  2.206999e+08  1462953973   \n",
       "2    2.938758e+07  4.675541e+08  4.381665e+08  9.057206e+08  4959962598   \n",
       "3    4.993555e+07  1.292967e+08  7.936120e+07  2.086580e+08   895910429   \n",
       "4    4.055258e+07  1.537821e+08  1.132295e+08  2.670117e+08  1203913048   \n",
       "..            ...           ...           ...           ...         ...   \n",
       "414  2.413149e+06  2.713051e+06  2.999022e+05  3.012953e+06     2713051   \n",
       "415 -1.412053e+08  1.883342e+08  3.295394e+08  5.178736e+08   762045800   \n",
       "416 -4.336304e+07  3.750919e+08  4.184550e+08  7.935469e+08   846547400   \n",
       "417 -3.940045e+07  1.642095e+08  2.036099e+08  3.678194e+08   575411600   \n",
       "418  2.922406e+07  6.598126e+07  3.675721e+07  1.027385e+08   188330100   \n",
       "\n",
       "      净买额占总成交比    成交额占总成交比          流通市值                           上榜原因  \n",
       "0    -7.858208   33.531268  2.796761e+09               日跌幅偏离值达到7%的前5只证券  \n",
       "1    -7.376984   15.085906  7.500502e+09                日振幅值达到15%的前5只证券  \n",
       "2     0.592496   18.260633  3.332571e+10                日振幅值达到15%的前5只证券  \n",
       "3     5.573721   23.290046  3.353614e+09       连续三个交易日内，涨幅偏离值累计达到20%的证券  \n",
       "4     3.368398   22.178651  2.634710e+09                日换手率达到20%的前5只证券  \n",
       "..         ...         ...           ...                            ...  \n",
       "414  88.945937  111.054054  6.640000e+08  有价格涨跌幅限制的日收盘价格涨幅偏离值达到7%的前三只证券  \n",
       "415 -18.529760   67.958326  9.001510e+09    有价格涨跌幅限制的日收盘价格跌幅达到15%的前五只证券  \n",
       "416  -5.122340   93.739221  5.695886e+09      有价格涨跌幅限制的日价格振幅达到30%的前五只证券  \n",
       "417  -6.847351   63.922831  5.739089e+09    有价格涨跌幅限制的日收盘价格涨幅达到15%的前五只证券  \n",
       "418  15.517464   54.552336  1.647410e+09    有价格涨跌幅限制的日收盘价格涨幅达到15%的前五只证券  \n",
       "\n",
       "[419 rows x 16 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>上榜日期</th>\n",
       "      <th>解读</th>\n",
       "      <th>收盘价</th>\n",
       "      <th>涨跌幅</th>\n",
       "      <th>换手率</th>\n",
       "      <th>龙虎榜净买额</th>\n",
       "      <th>龙虎榜买入额</th>\n",
       "      <th>龙虎榜卖出额</th>\n",
       "      <th>龙虎榜成交额</th>\n",
       "      <th>市场总成交额</th>\n",
       "      <th>净买额占总成交比</th>\n",
       "      <th>成交额占总成交比</th>\n",
       "      <th>流通市值</th>\n",
       "      <th>上榜原因</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000608</td>\n",
       "      <td>阳光股份</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>卖一主卖，成功率48.36%</td>\n",
       "      <td>3.73</td>\n",
       "      <td>-9.9034</td>\n",
       "      <td>3.8430</td>\n",
       "      <td>-8.709942e+06</td>\n",
       "      <td>1.422786e+07</td>\n",
       "      <td>2.293780e+07</td>\n",
       "      <td>3.716565e+07</td>\n",
       "      <td>110838793</td>\n",
       "      <td>-7.858208</td>\n",
       "      <td>33.531268</td>\n",
       "      <td>2.796761e+09</td>\n",
       "      <td>日跌幅偏离值达到7%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000751</td>\n",
       "      <td>锌业股份</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>主力做T，成功率18.84%</td>\n",
       "      <td>5.32</td>\n",
       "      <td>-2.9197</td>\n",
       "      <td>19.6505</td>\n",
       "      <td>-1.079219e+08</td>\n",
       "      <td>5.638899e+07</td>\n",
       "      <td>1.643109e+08</td>\n",
       "      <td>2.206999e+08</td>\n",
       "      <td>1462953973</td>\n",
       "      <td>-7.376984</td>\n",
       "      <td>15.085906</td>\n",
       "      <td>7.500502e+09</td>\n",
       "      <td>日振幅值达到15%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000762</td>\n",
       "      <td>西藏矿业</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>北京资金买入，成功率39.42%</td>\n",
       "      <td>63.99</td>\n",
       "      <td>1.0741</td>\n",
       "      <td>15.6463</td>\n",
       "      <td>2.938758e+07</td>\n",
       "      <td>4.675541e+08</td>\n",
       "      <td>4.381665e+08</td>\n",
       "      <td>9.057206e+08</td>\n",
       "      <td>4959962598</td>\n",
       "      <td>0.592496</td>\n",
       "      <td>18.260633</td>\n",
       "      <td>3.332571e+10</td>\n",
       "      <td>日振幅值达到15%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>000833</td>\n",
       "      <td>粤桂股份</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>实力游资买入，成功率44.55%</td>\n",
       "      <td>8.87</td>\n",
       "      <td>10.0496</td>\n",
       "      <td>8.8263</td>\n",
       "      <td>4.993555e+07</td>\n",
       "      <td>1.292967e+08</td>\n",
       "      <td>7.936120e+07</td>\n",
       "      <td>2.086580e+08</td>\n",
       "      <td>895910429</td>\n",
       "      <td>5.573721</td>\n",
       "      <td>23.290046</td>\n",
       "      <td>3.353614e+09</td>\n",
       "      <td>连续三个交易日内，涨幅偏离值累计达到20%的证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>001208</td>\n",
       "      <td>华菱线缆</td>\n",
       "      <td>2021-08-27</td>\n",
       "      <td>1家机构买入，成功率40.43%</td>\n",
       "      <td>19.72</td>\n",
       "      <td>4.3386</td>\n",
       "      <td>46.1985</td>\n",
       "      <td>4.055258e+07</td>\n",
       "      <td>1.537821e+08</td>\n",
       "      <td>1.132295e+08</td>\n",
       "      <td>2.670117e+08</td>\n",
       "      <td>1203913048</td>\n",
       "      <td>3.368398</td>\n",
       "      <td>22.178651</td>\n",
       "      <td>2.634710e+09</td>\n",
       "      <td>日换手率达到20%的前5只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>414</th>\n",
       "      <td>605580</td>\n",
       "      <td>恒盛能源</td>\n",
       "      <td>2021-08-20</td>\n",
       "      <td>买一主买，成功率33.33%</td>\n",
       "      <td>13.28</td>\n",
       "      <td>10.0249</td>\n",
       "      <td>0.4086</td>\n",
       "      <td>2.413149e+06</td>\n",
       "      <td>2.713051e+06</td>\n",
       "      <td>2.999022e+05</td>\n",
       "      <td>3.012953e+06</td>\n",
       "      <td>2713051</td>\n",
       "      <td>88.945937</td>\n",
       "      <td>111.054054</td>\n",
       "      <td>6.640000e+08</td>\n",
       "      <td>有价格涨跌幅限制的日收盘价格涨幅偏离值达到7%的前三只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>415</th>\n",
       "      <td>688029</td>\n",
       "      <td>南微医学</td>\n",
       "      <td>2021-08-20</td>\n",
       "      <td>4家机构卖出，成功率55.82%</td>\n",
       "      <td>204.61</td>\n",
       "      <td>-18.5340</td>\n",
       "      <td>8.1809</td>\n",
       "      <td>-1.412053e+08</td>\n",
       "      <td>1.883342e+08</td>\n",
       "      <td>3.295394e+08</td>\n",
       "      <td>5.178736e+08</td>\n",
       "      <td>762045800</td>\n",
       "      <td>-18.529760</td>\n",
       "      <td>67.958326</td>\n",
       "      <td>9.001510e+09</td>\n",
       "      <td>有价格涨跌幅限制的日收盘价格跌幅达到15%的前五只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>416</th>\n",
       "      <td>688408</td>\n",
       "      <td>中信博</td>\n",
       "      <td>2021-08-20</td>\n",
       "      <td>4家机构卖出，成功率47.86%</td>\n",
       "      <td>179.98</td>\n",
       "      <td>-0.0666</td>\n",
       "      <td>15.3723</td>\n",
       "      <td>-4.336304e+07</td>\n",
       "      <td>3.750919e+08</td>\n",
       "      <td>4.184550e+08</td>\n",
       "      <td>7.935469e+08</td>\n",
       "      <td>846547400</td>\n",
       "      <td>-5.122340</td>\n",
       "      <td>93.739221</td>\n",
       "      <td>5.695886e+09</td>\n",
       "      <td>有价格涨跌幅限制的日价格振幅达到30%的前五只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>417</th>\n",
       "      <td>688556</td>\n",
       "      <td>高测股份</td>\n",
       "      <td>2021-08-20</td>\n",
       "      <td>上海资金买入，成功率60.21%</td>\n",
       "      <td>51.97</td>\n",
       "      <td>17.0495</td>\n",
       "      <td>10.6452</td>\n",
       "      <td>-3.940045e+07</td>\n",
       "      <td>1.642095e+08</td>\n",
       "      <td>2.036099e+08</td>\n",
       "      <td>3.678194e+08</td>\n",
       "      <td>575411600</td>\n",
       "      <td>-6.847351</td>\n",
       "      <td>63.922831</td>\n",
       "      <td>5.739089e+09</td>\n",
       "      <td>有价格涨跌幅限制的日收盘价格涨幅达到15%的前五只证券</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>418</th>\n",
       "      <td>688636</td>\n",
       "      <td>智明达</td>\n",
       "      <td>2021-08-20</td>\n",
       "      <td>2家机构买入，成功率47.37%</td>\n",
       "      <td>161.90</td>\n",
       "      <td>15.8332</td>\n",
       "      <td>11.9578</td>\n",
       "      <td>2.922406e+07</td>\n",
       "      <td>6.598126e+07</td>\n",
       "      <td>3.675721e+07</td>\n",
       "      <td>1.027385e+08</td>\n",
       "      <td>188330100</td>\n",
       "      <td>15.517464</td>\n",
       "      <td>54.552336</td>\n",
       "      <td>1.647410e+09</td>\n",
       "      <td>有价格涨跌幅限制的日收盘价格涨幅达到15%的前五只证券</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>419 rows × 16 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 15
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 股东数目"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "source": [
    "ef.stock.get_latest_holder_number()"
   ],
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "       股票代码  股票名称   股东人数     股东人数增减  较上期变化百分比            股东户数统计截止日  \\\n",
       "0    688618  三旺通信   4975  -7.200149    -386.0  2021-06-30 00:00:00   \n",
       "1    688567  孚能科技  17810   7.860950    1298.0  2021-06-30 00:00:00   \n",
       "2    688518  联赢激光  13868 -10.419224   -1613.0  2021-06-30 00:00:00   \n",
       "3    688388  嘉元科技  11158  44.216104    3421.0  2021-06-30 00:00:00   \n",
       "4    688321  微芯生物  23855  11.780142    2514.0  2021-06-30 00:00:00   \n",
       "..      ...   ...    ...        ...       ...                  ...   \n",
       "401  600618  氯碱化工  45372  -0.756814    -346.0  2014-06-30 00:00:00   \n",
       "402  601880  辽港股份  89923  -3.589540   -3348.0  2014-03-31 00:00:00   \n",
       "403  600685  中船防务  52296  -4.807325   -2641.0  2014-03-11 00:00:00   \n",
       "404  000017  深中华A  21358 -10.800200   -2586.0  2013-06-30 00:00:00   \n",
       "405  601992  金隅集团  66736 -12.690355   -9700.0  2013-06-30 00:00:00   \n",
       "\n",
       "           户均持股市值        户均持股数量           总市值         总股本                 公告日期  \n",
       "0    4.338763e+05  10156.280402  2.158535e+09    50527495  2021-08-30 00:00:00  \n",
       "1    2.060182e+06  60116.209152  3.669185e+10  1070669685  2021-08-30 00:00:00  \n",
       "2    4.049599e+05  21574.848572  5.615984e+09   299200000  2021-08-30 00:00:00  \n",
       "3    1.882101e+06  20691.521778  2.100048e+10   230876000  2021-08-30 00:00:00  \n",
       "4    7.952706e+05  17217.375812  1.897118e+10   410720500  2021-08-30 00:00:00  \n",
       "..            ...           ...           ...         ...                  ...  \n",
       "401  1.227918e+05  16526.491581  5.571311e+09   749839976  2014-08-22 00:00:00  \n",
       "402  9.051553e+04  37403.111551  8.139428e+09  3363400000  2014-04-30 00:00:00  \n",
       "403  1.315491e+05   8384.263691  6.879492e+09   438463454  2014-03-18 00:00:00  \n",
       "404  5.943993e+04  14186.140556  1.269518e+09   302987590  2013-08-24 00:00:00  \n",
       "405  2.333339e+05  46666.785918  1.557177e+10  3114354625  2013-08-22 00:00:00  \n",
       "\n",
       "[4406 rows x 11 columns]"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>股票代码</th>\n",
       "      <th>股票名称</th>\n",
       "      <th>股东人数</th>\n",
       "      <th>股东人数增减</th>\n",
       "      <th>较上期变化百分比</th>\n",
       "      <th>股东户数统计截止日</th>\n",
       "      <th>户均持股市值</th>\n",
       "      <th>户均持股数量</th>\n",
       "      <th>总市值</th>\n",
       "      <th>总股本</th>\n",
       "      <th>公告日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>688618</td>\n",
       "      <td>三旺通信</td>\n",
       "      <td>4975</td>\n",
       "      <td>-7.200149</td>\n",
       "      <td>-386.0</td>\n",
       "      <td>2021-06-30 00:00:00</td>\n",
       "      <td>4.338763e+05</td>\n",
       "      <td>10156.280402</td>\n",
       "      <td>2.158535e+09</td>\n",
       "      <td>50527495</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>688567</td>\n",
       "      <td>孚能科技</td>\n",
       "      <td>17810</td>\n",
       "      <td>7.860950</td>\n",
       "      <td>1298.0</td>\n",
       "      <td>2021-06-30 00:00:00</td>\n",
       "      <td>2.060182e+06</td>\n",
       "      <td>60116.209152</td>\n",
       "      <td>3.669185e+10</td>\n",
       "      <td>1070669685</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>688518</td>\n",
       "      <td>联赢激光</td>\n",
       "      <td>13868</td>\n",
       "      <td>-10.419224</td>\n",
       "      <td>-1613.0</td>\n",
       "      <td>2021-06-30 00:00:00</td>\n",
       "      <td>4.049599e+05</td>\n",
       "      <td>21574.848572</td>\n",
       "      <td>5.615984e+09</td>\n",
       "      <td>299200000</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>688388</td>\n",
       "      <td>嘉元科技</td>\n",
       "      <td>11158</td>\n",
       "      <td>44.216104</td>\n",
       "      <td>3421.0</td>\n",
       "      <td>2021-06-30 00:00:00</td>\n",
       "      <td>1.882101e+06</td>\n",
       "      <td>20691.521778</td>\n",
       "      <td>2.100048e+10</td>\n",
       "      <td>230876000</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>688321</td>\n",
       "      <td>微芯生物</td>\n",
       "      <td>23855</td>\n",
       "      <td>11.780142</td>\n",
       "      <td>2514.0</td>\n",
       "      <td>2021-06-30 00:00:00</td>\n",
       "      <td>7.952706e+05</td>\n",
       "      <td>17217.375812</td>\n",
       "      <td>1.897118e+10</td>\n",
       "      <td>410720500</td>\n",
       "      <td>2021-08-30 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>401</th>\n",
       "      <td>600618</td>\n",
       "      <td>氯碱化工</td>\n",
       "      <td>45372</td>\n",
       "      <td>-0.756814</td>\n",
       "      <td>-346.0</td>\n",
       "      <td>2014-06-30 00:00:00</td>\n",
       "      <td>1.227918e+05</td>\n",
       "      <td>16526.491581</td>\n",
       "      <td>5.571311e+09</td>\n",
       "      <td>749839976</td>\n",
       "      <td>2014-08-22 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>402</th>\n",
       "      <td>601880</td>\n",
       "      <td>辽港股份</td>\n",
       "      <td>89923</td>\n",
       "      <td>-3.589540</td>\n",
       "      <td>-3348.0</td>\n",
       "      <td>2014-03-31 00:00:00</td>\n",
       "      <td>9.051553e+04</td>\n",
       "      <td>37403.111551</td>\n",
       "      <td>8.139428e+09</td>\n",
       "      <td>3363400000</td>\n",
       "      <td>2014-04-30 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>403</th>\n",
       "      <td>600685</td>\n",
       "      <td>中船防务</td>\n",
       "      <td>52296</td>\n",
       "      <td>-4.807325</td>\n",
       "      <td>-2641.0</td>\n",
       "      <td>2014-03-11 00:00:00</td>\n",
       "      <td>1.315491e+05</td>\n",
       "      <td>8384.263691</td>\n",
       "      <td>6.879492e+09</td>\n",
       "      <td>438463454</td>\n",
       "      <td>2014-03-18 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>404</th>\n",
       "      <td>000017</td>\n",
       "      <td>深中华A</td>\n",
       "      <td>21358</td>\n",
       "      <td>-10.800200</td>\n",
       "      <td>-2586.0</td>\n",
       "      <td>2013-06-30 00:00:00</td>\n",
       "      <td>5.943993e+04</td>\n",
       "      <td>14186.140556</td>\n",
       "      <td>1.269518e+09</td>\n",
       "      <td>302987590</td>\n",
       "      <td>2013-08-24 00:00:00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>405</th>\n",
       "      <td>601992</td>\n",
       "      <td>金隅集团</td>\n",
       "      <td>66736</td>\n",
       "      <td>-12.690355</td>\n",
       "      <td>-9700.0</td>\n",
       "      <td>2013-06-30 00:00:00</td>\n",
       "      <td>2.333339e+05</td>\n",
       "      <td>46666.785918</td>\n",
       "      <td>1.557177e+10</td>\n",
       "      <td>3114354625</td>\n",
       "      <td>2013-08-22 00:00:00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4406 rows × 11 columns</p>\n",
       "</div>"
      ]
     },
     "metadata": {},
     "execution_count": 16
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "# 更多使用例子详见文档 [efinance-docs](https://efinance.readthedocs.io/)\r\n"
   ],
   "metadata": {}
  }
 ]
}